<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>对齐方式</title>
    <style>
        .c1{
            height: 59px;
            width: 300px;
            border: 1px solid red;

            text-align: center;/*水平方向居中*/
            line-height: 59px;/*垂直方向居中*/
        }
    </style>
</head>
<body>
<div class="c1">QWER</div>
</body>
</html>